<template>
  <div>
    <!-- <p ref="pp" class="pp" v-if="active">{{width}}</p>
    <p @click="tick()">点击</p> -->
    <p >{{msg}}</p>
    <button @click="jj">点击</button>
  </div>
</template>
<script>
var mixin={
  data(){
    return{
      msg_mixins:'mixxins',
      msg:123
    }
  }
}
export default {
  name: 'my',
  mixins:[mixin],
  data(){
    return{
      active:false,
      width:"",
      obj:{}
    }
  },
  methods:{
    jj(){
      this.$set(this.obj,"newset",'新的属性')
      
    }
  //   tick(){
  //   this.active=true;
  //   this.$nextTick(()=>{
  //     this.width=this.$refs.pp.offsetWidth
  //   })
  // }
  }
}
</script>

<style lang="scss">
  .pp{
    width: 100px;
  }
</style>
